/*
package com.platform.qujia.rocketmq;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.Gson;
import com.platform.qujia.constantEnum.Constant;
import com.platform.qujia.constantEnum.RocketMQConfig;
import com.platform.qujia.pojo.CleanScore;
import com.platform.qujia.service.ICleanScoreService;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.client.consumer.DefaultMQPushConsumer;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.apache.rocketmq.spring.core.RocketMQPushConsumerLifecycleListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

*/
/**
 * 清分数据拉取
 *//*

@Component
@Slf4j
@RocketMQMessageListener(topic = RocketMQConfig.TOPIC,consumerGroup = RocketMQConfig.CONSUMERGROUP)
public class CleanScoreConsumer implements RocketMQListener<String>, RocketMQPushConsumerLifecycleListener {

    @Autowired
    private ObjectMapper objectMapper;

    @Autowired
    private ICleanScoreService cleanScoreService;

    @Override
    public void onMessage(String s) {
        try {
            CleanScore cleanScore = objectMapper.readValue(s, CleanScore.class);
            cleanScoreService.save(cleanScore);
        } catch (Exception e) {
           log.info(e.getMessage());
        }

    }

    @Override
    public void prepareStart(DefaultMQPushConsumer defaultMQPushConsumer) {
        defaultMQPushConsumer.setInstanceName("shensi");
    }
}
*/
